<?php
	define("rootdir", str_replace("\\", "/", dirname(__FILE__))."/");
	
	require_once("php/swfaddress.php");
	require_once("php/seo.php");
	
	// SWF address optimizer handler.
	$swfaddress = new SWFAddress;
	$swfaddress->init();
	
	// Get seo from specified file in config.xml. 
	$seo = new Seo;
	$seo->init($swfaddress->getChunks(), "fr");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
	<head>
		<title><?php echo($seo->getMeta("title")); ?></title>
		
		<!-- Meta -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="author" content="Marcel" />
		<meta name="description" value="<?php echo($seo->getMeta("description")); ?>" />
		<meta name="keywords" value="<?php echo($seo->getMeta("keywords")); ?>" />
		<?php $seo->writeOGMetas(); ?>
				
		<!-- CSS -->
		<style type="text/css">
			body { margin: 0; padding: 0; font-family: arial; font-size: 10px }
		</style>
		
		<!-- JavasScript -->
		<script type="text/javascript" src="web/js/swfobject.js"></script>
		<script type="text/javascript" src="web/js/swfaddress.js"></script>
		<script type="text/javascript" src="<?= $swfaddress->writeOptimizer("web/js/swfaddress-optimizer.js?flash=10") ?>"></script>
		<script type="text/javascript" src="web/js/swffit.js"></script>
		<script type="text/javascript">
		//<![CDATA[
			var flashvars = { c: "fr",
							  l: "en",
					  htmlembed: "true",
					   site_xml: "web/xml/config/site.xml",
				   enable_debug: "false" };
			var params = { allowscriptaccess: "always",
							allowfullscreen: "true",
									  scale: "noscale",
									   menu: "false",
									quality: "high",
									bgcolor: "#ffffff" };
			// params.mode = (swfobject.getFlashPlayerVersion().major <= 10) ? "opaque" : "direct";
			
			var attributes = { id: "mainswf",
							 name: "mainswf" };
    
			//swfobject.embedSWF("web/swf/main.swf", "flashcontent", "990", "590", "10", "web/swf/expressInstall.swf", flashvars, params, attributes);
			swffit.fit("mainswf");
		//]]>
        </script>
	</head>
	
	<body>
		<div id="content">
			<div id="flashcontent">
				<!-- SEO -->
				<h1><?php echo($seo->getMeta("title")) ?></h1>
				<?php $seo->writeMetaNav($swfaddress->base) ?>
				<p><?php echo($seo->getMeta("altContent")) ?></p>
				
				<!-- GET PLUGIN -->
				<p>Ce site nécessite le plug in Flash</p>
				<p><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Télécharger le plug in Flash</a></p>
			</div>
		</div>		
	</body>
	
	<!-- Google Analytics -->
	<script type="text/javascript">
	//<![CDATA[
		var _gaq = _gaq || [];
			_gaq.push(["_setAccount", "UA-XXXXX-X"]);
			_gaq.push(["_trackPageview"]);
			
		(function() {
			var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
				ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
				(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
		})();
	//]]>
	</script>
</html>